/* 
 * File:   driver_timer.h
 * Author: Ich
 *
 * Created on 23.02.2014, 16:03
 *
 * Description:
 * -
 */

#ifndef DRIVER_TIMER_H
#define	DRIVER_TIMER_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <GenericTypeDefs.h>
/*******************************************************************************
 *  public preprocessing definitions
 */

 /*******************************************************************************
 *  public variables
 */

/*******************************************************************************
 *  public functions
 */

/*******************************************
 *  Timer 1 is used for counting
 */
/* Timer #1 on. Timer is counting in 1ms steps.
 *
 */
void drvTmr1_on             (void);


/* get's actual value of Timer #1
 *
 */
UINT16 drvTmr1_getValue     (void);


/*******************************************
 *  Timer 2 is used for LED data output
 */
/* Timer #2 on. Generates an interrupt and restarts
 * every 1.25usec.
 *
 */
void drvTmr2_on             (void);


/* Timer #2 off.
 *
 */
void drvTmr2_off            (void);

/* Timer #2 reset (timer off, then timer on).
 *
 */
void drvTmr2_reset          (void);

/* Returns the timer #2 end register.
 * --> timer counts from 0 to "tmr2EndRegister"
 *
 * param(out)    tmr2EndRegister
 *
 */
UINT16 drvTmr2_getCntTarget ();

 /*******************************************
 *  Timer 3 is used for PWM signal of buzzer
 */
/* Timer #3 on. Generates an interrupt and restarts
 * every "freq" [Hz].
 *
 * param(in)    freq   [Hz]
 *
 */
void drvTmr3_on             (UINT16 freq);



/* Timer #3 off. 
 *
 */
void drvTmr3_off            (void);


/* Returns the timer #3 end register.
 * --> timer counts from 0 to "tmr3EndRegister"
 *
 * param(out)    tmr3EndRegister
 *
 */
UINT16 drvTmr3_getCntTarget ();

/* Sets the timer #3 end register.
 *
 * param(in)    freq    [Hz]
 *
 */
void drvTmr3_setCntTarget   (UINT16 freq);

 /*******************************************
 *  Timer 4 is used for sound signal of buzzer
 */
/* Timer #4 on. Generates an interrupt and restarts
 * every 200 msec.
 *
 */
void drvTmr4_on             (void);


/* Timer #4 off.
 *
 */
void drvTmr4_off            (void);

/* Timer #4 reset (timer off, then timer on).
 *
 */
void drvTmr4_reset          (void);

#ifdef	__cplusplus
}
#endif

#endif	/* DRIVER_TIMER_H */


